<!--多端判断代码begin-->
<script type="text/javascript">
/*判断访问终端*/
var browser={
    versions:function(){
        var u = navigator.userAgent;
        var app = navigator.appVersion;
    	var ua = navigator.userAgent.toLocaleLowerCase();
        return {
            trident: u.indexOf('Trident') > -1, /*IE内核*/
            presto: u.indexOf('Presto') > -1, /*opera内核*/
            webKit: u.indexOf('AppleWebKit') > -1, /*苹果、谷歌内核*/
            gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,/*火狐内核*/
            mobile: !!u.match(/AppleWebKit.*Mobile.*/), /*是否为移动终端*/
            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), /*ios终端*/
            android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, /*android终端*/
            iPhone: u.indexOf('iPhone') > -1 , /*是否为iPhone或者QQHD浏览器*/
            iPad: u.indexOf('iPad') > -1, /*是否iPad*/
            webApp: u.indexOf('Safari') == -1, /*是否web应该程序，没有头部与底部*/
            bsl: u.indexOf('bsl') > -1, /*是否是变色龙app*/
            weixin: ua.match(/MicroMessenger/i) == "micromessenger" || ua.match(/MicroMessenger\/[0-9]/i), /*是否是微信*/
            qq: !!ua.match(/QQ\/[0-9]/i), /*是否为qq*/
            weibo: ua.match(/WeiBo/i) == "weibo", /*是否为微博*/
        };
    }(),
    language:(navigator.browserLanguage || navigator.language).toLowerCase()
}
</script>
<!--多端判断代码end-->

<!-- 自动复制代码begin -->            
<style type="text/css">
   #input {position: absolute;top: 0;left: 0;opacity: 0;z-index: -10;}
</style>
   <textarea id="input"></textarea>

<script type="text/javascript">
	function copyText(tag,text,jump) {
		if(tag==true){
	      var input = document.getElementById("input");
	      input.value = text;
	      input.select();
	      document.execCommand("copy");
			if(1 == jump){
				/*跳转微信*/
				window.location.href = 'weixin://';
			}
			if(2 == jump){
				/*跳转QQ*/
				window.location.href = 'mqqwpa://';
			}
			if(3 == jump){
				/*跳转支付宝*/
				window.location.href = 'alipays://';
			}
			if(4 == jump){
				/*跳转淘宝*/
				window.location.href = 'taobao://main.m.taobao.com';
			}
			if(5 == jump){
				/*跳转抖音*/
				window.location.href = 'snssdk1128://';
			}
			if(6 == jump){
				/*跳转快手*/
				window.location.href = 'kwai://profile/uid';
			}
		}
	}
</script>
<!-- 自动复制代码end -->

<!--cookie设置代码begin-->
<script type="text/javascript">
	/*检查是否存在cookie*/
	function checkCookie(cname) {
	    if (-1 == document.cookie.indexOf(cname)) {
	    	/*未存在cookie*/
	    	return false;
	    }else{
	    	/*已存在cookie*/
	    	return true;
	    }
	};
	/*设置cookie的值*/
	function setCookie(cname, cvalue, expire) {
	    var exdate=new Date();
		/*exdate.setDate(exdate.getDate()+expire);//按天*/
		exdate.setTime(exdate.getTime()+expire*60*1000);/*按分钟*/
	    var expires = "expires=" + exdate.toGMTString();
	    document.cookie = cname + "=" + escape(cvalue) + "; " + expires+ "; path=/;";
	}
	/*读取cookie的值*/   
	function getCookie(cname) {
	    if (document.cookie.length > 0) {
	        c_start = document.cookie.indexOf(cname + "=");
	        if (c_start != -1){ 
	            c_start = c_start + cname.length + 1;
	            c_end = document.cookie.indexOf(";", c_start);
	            if (c_end == -1){
	                c_end = document.cookie.length;
	                return unescape(document.cookie.substring(c_start, c_end));
	            } 
	        }
		}
	    return "";
	}
	/*清除cookie*/ 
	function clearCookie(cname) {     
	    setCookie(cname, "", -1); 
	}
</script>
<!--cookie设置代码end-->